home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / MOTD / ReadMe.txt < prev   
INI File  |  1995-06-12  |  7KB  |  169 lines

  1. [This is a patched version of MOTD that has been built under 3.0 - cdl]
  2.  
  3. CHANGES FOR 3.0
  4.  
  5. The MOTD application no longer updates the /usr/adm/wtmp and /usr/adm/lastlog
  6. files.  This deficiency in Workspace has been corrected in 3.0.  Thus, there
  7. is no longer a LogoutHook component.  You'll want to:
  8.  
  9.     dremove loginwindow LogoutHook
  10.  
  11. if you were previously using the '/usr/local/bin/LogoutHook' component. You
  12. should also do
  13.  
  14.     dwrite loginwindow LoginHook /LocalApps/MOTD.app/MOTD
  15.     
  16. to change the LoginHook from 'LocalApps/MOTD' to '/LocalApps/MOTD.app/MOTD'.
  17.  
  18. MOTD now handles '*.rtfd' files but it no longer assumes that if the first
  19. character of a file is {, then it is in RTF format.  It now only looks at
  20. file name extensions (*.rtf & *.rtfd) to determine if a file contains RTF.  
  21.  
  22. MOTD no longer uses the files mail.snd and newmail.snd on the /LocalLibrary/Sounds directory (these *.snd files contained the"You have
  23. mail" and "You have new mail" voice alerts).  Instead, it contains
  24. localizable sound files in the MOTD.app application bundle itself.
  25.  
  26. The system defaults have been moved from the MOTD.h to the file
  27. Defaults.strings in the MOTD.app application bundle.
  28.  
  29.  
  30. DESCRIPTION
  31.  
  32. The MOTD application (designed to run as a LoginHook under loginwindow or
  33. be launched) displays the contents of the file /etc/motd (or any file you
  34. choose) in a window when a user logs on.  By default, the application
  35. checks the modification date of the file against the user's last login
  36. time (as recorded in /usr/adm/wtmp) and does nothing if the file hasn't
  37. changed.
  38.  
  39. The MOTD window has three buttons, one to hold the window on the screen
  40. (it goes away automatically in 25 seconds--the hold button displays the
  41. count down), another to quit (and proceed with the login) and a third to
  42. cancel the login (only enabled if MOTD is run as a LoginHook).  MOTD also
  43. implements a Mail Alert panel which appears if there is unread mail.  The
  44. panel automatically goes away (in a couple of seconds) if there isn't a
  45. new /etc/motd message. 
  46.  
  47. To get an idea of what MOTD does (without installing it), as root do:
  48.  
  49.         #touch /etc/motd
  50.         #MOTD
  51.  
  52. When used as a LoginHook, the window appears over a blank screen just as
  53. the user logs in.  MOTD supports RTF.
  54.  
  55.  
  56. INSTALLATION
  57.  
  58. To install MOTD as a LoginHook, put it on /LocalApps, put LogoutHook on /usr/local/bin and as root do:
  59.  
  60.         dwrite loginwindow LoginHook /LocalApps/MOTD.app/MOTD
  61.  
  62. alternatively, the file /etc/ttys can be modified to include the -LoginHook
  63. arguments to loginwindow.
  64.  
  65. You may want to consider commenting out the following lines in
  66. /usr/adm/monthly that trim the wtmp and lastlog files or else users may
  67. see messages they've read over again and the loging information won't
  68. be correct:
  69.  
  70.         # Trim the lastlog
  71.         # cp -p /usr/adm/lastlog /usr/adm/lastlog.old
  72.         # cat /dev/null > /usr/adm/lastlog
  73.  
  74.         # Trim wtmp
  75.         # cp -p /usr/adm/wtmp /usr/adm/wtmp.old
  76.         # cat /dev/null > /usr/adm/wtmp
  77.  
  78. You may want to come up with some less frequent  scheme for triming the
  79. wtmp file.  A program that can do this, trimwtmp.c, is included and can
  80. be added to the /usr/adm/monthly cleanup.   See the trimwtmp.c file for
  81. details.  Finally, restart the window server (login as EXIT or reboot)
  82. for this to take effect.  Update /etc/motd as appropriate.
  83.  
  84. If you don't want to make MOTD a requirement for users, then don't make
  85. it a LoginHook but instead have interested users add it to their dock
  86. and set it launch at startup using the 'Preferences...' panel of Workspace.
  87.  
  88. DEFAULTS
  89.  
  90. MOTD has the following defaults that can be changed (if used as a LoginHook,
  91. they have to be changed in root's defaults database):
  92.  
  93.         File -- The file to display, defaults to /etc/motd.
  94.     
  95.         Wait -- The amount of time to display File, defaults to 25 seconds.
  96.         
  97.         MailWait -- The amount of time to display mail alert, defaults to
  98.                     2 seconds.
  99.         
  100.         Hold -- Whether or not (Yes or No) to come up held, No by default.
  101.                 If Yes then the Hold button won't appear.
  102.  
  103.         OnlyOnce -- Whether or not (Yes or No) to check file date, Yes by
  104.                     default.  If No, displays file on every login.
  105.  
  106. The defaults can be changed via root's defaults database or by editing their
  107. values in the Defaults.strings file in the MOTD.app application bundle.
  108.  
  109. MOTD also uses the SystemAlert default of the System entry in the defaults
  110. database to control voice messages on the mail alerts.  This value can be
  111. set (by root if MOTD is a LoginHook) via the 'Use Voice Alerts' checkbox in
  112. the Preferences application. You may need to force an entry for SystemAlert
  113. by cycling the 'Use Voice Alerts' checkbox (turning off and on the check
  114. mark) as root's defaults database may not contain an entry for SystemAlert
  115. even though the checkbox is selected.
  116.  
  117.  
  118. FILE FORMAT
  119.  
  120. The File is assumed to be any plain text format acceptable to a ScrollView.
  121.  MOTD also recognizes the 'rtf' and 'rtfd' file extensions as RTF (rich text
  122.  format) files and displays them as such.  If you use RTF files with MOTD,
  123.  it is probably best to create separate files, motd and motd.rtf, and change
  124.  the File default above to use the motd.rtf (or motd.rtfd) file (dwrite the
  125.  new File default as root if MOTD is a LoginHook):
  126.  
  127.     dwrite MOTD File /etc/motd.rtf
  128.  
  129. This prevents network logins being presented with the RTF structured text.
  130.  
  131.  
  132. DIAGNOSTICS
  133.  
  134. MOTD is designed to run as a LoginHook for the loginwindow program and thus
  135. always tries to return success (0), even on error, so that the user can still
  136. log in if the program runs into trouble.  The 'Cancel Login' button causes
  137. the program to exit with failure (1) and abort the login.
  138.  
  139.  
  140. BUGS
  141.  
  142. MOTD determines that a file is in RTF format based on its extension and
  143. doesn't look at content.
  144.  
  145. An affirmative database value for Hold and OnlyOnce can be 'Yes' , YES'  or
  146. 'yes'  but not 'true' .  Anything not starting with Y/y is considered 'No'.
  147.  
  148. The console device that MOTD enters into the wtmp file is hardcoded in
  149. MOTD_main.m since basename(ttyname(0)) didn't work in the context of a
  150. LoginHook.
  151.  
  152. The timeout should probably be a function of the number of lines of text
  153. in the file being displayed.
  154.  
  155.  
  156. AUTHORS
  157.  
  158. Christopher Lane (lane@sumex-aim.stanford.edu)
  159. Symbolic Systems Resources Group
  160. Knowledge Systems Laboratory
  161. Stanford University
  162.  
  163. Izumi Ohzawa (izumi@violet.berkeley.edu)
  164. Group in Neurobiology/School of Optometry
  165. University of California, Berkeley
  166.  
  167. Steve Hayman (sahayman@cs.indiana.edu)
  168. Computer Science Department Workstation Manager
  169.